package com.shigu.trade.enums;

public enum OrderState {
    WAITPAY(1,"待付款"),
    WAITSEND(2,"等待发货"),
    WAITRECEIVE(3,"待收货"),
    COMPELETE(4,"已完成"),
    CLOSED(5,"已关闭");

    public static OrderState selByValue(int value){
        for(OrderState pt: OrderState.values()){
            if(pt.getValue()==value){
                return pt;
            }
        }
        return null;
    }


    OrderState(int value, String title) {
        this.value = value;
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    private int value;
    private String title;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    }
